#include "dominion_helpers.h"
#include "dominion.h"
#include "rngs.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

void myAssert(int a, int b)
{
	if (a != b)
	{
		printf("---score mismatch\n"
				"score: %d , expected: %d\n\n", a, b);
	}
}

int main()
{
	//scoring cards: curse = -1, estate = 1, duchy = 3, province = 6
	//great_hall = 1, gardens = 1 for floor(every 10 cards in deck)
	printf("Testing scoreFor:\n");
	struct gameState G;
	int expected;
	int k[10] = {adventurer, council_room, feast, gardens, mine,
	             remodel, smithy, village, baron, great_hall};

	initializeGame(2, k, 1, &G); //initialize score = 3;
	expected = 3;
	myAssert(scoreFor(0, &G), expected);

	G.hand[0][G.handCount[0]] = estate;
	G.handCount[0]++;
	expected = 4;
	myAssert(scoreFor(0, &G), expected);

	G.hand[0][G.handCount[0]] = duchy;
	G.handCount[0]++;
	expected = 7;
	myAssert(scoreFor(0, &G), expected);

	G.hand[0][G.handCount[0]] = province;
	G.handCount[0]++;
	expected = 13;
	myAssert(scoreFor(0, &G), expected);

	G.hand[0][G.handCount[0]] = great_hall;
	G.handCount[0]++;
	expected = 14;
	myAssert(scoreFor(0, &G), expected);





	printf("tests finished\n");
	return 0;
}
